﻿using UnityEngine;

namespace Assets.Scripts.Tool
{
    public class FormulaTool:MonoBehaviour
    {
        public static string Formula(string formula,string[] args)
        {            
            if (args == null)
            {
                return null;
            }
            for (int i = 0; i < args.Length; i++)
            {
                string[] arg = args[i].Split('_');
                formula = formula.Replace(arg[0], arg[1]);
            }
            return formula;
        }
    }
}